package com.blb.service.impl;

import com.blb.entity.Company;
import com.blb.entity.Product;
import com.blb.mapper.SupplierMapper;
import com.blb.service.ISupplierService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SupplierServiceImpl implements ISupplierService {

    @Autowired
    private SupplierMapper supplierMapper;

    @Override
    public List<Company> getSupplier(String id, Integer start, Integer length, String sname,String companyAddress) {
        return supplierMapper.getSupplier(id,start,length,sname,companyAddress);
    }

    @Override
    public int getSupplierCount(String id, String sname,String companyAddress) {
        return supplierMapper.getSupplierCount(id,sname,companyAddress);
    }

    @Override
    public List<Product> getProduct(String id, Integer start, Integer length,String sid,Integer sortType) {
        return supplierMapper.getProduct(id,start,length,sid,sortType);
    }

    @Override
    public int getProductCount(String id,String sid,Integer sortType) {
        return supplierMapper.getProductCount(id,sid,sortType);
    }

    @Override
    public Product getProById(String id) {
        return supplierMapper.getProById(id);
    }
}
